﻿

<!--********************* Part1:Jsp Head *********************-->

<%@ page contentType="text/html;charset=UTF-8"%>  
<%@ include file="/framework/head.jsp"%>

<!--********************* Part2:Java Code *********************-->
<%
	ProviderSearchEvent event = (ProviderSearchEvent)context.getSessionValue("ProviderSearchEvent");
    String isonecategory = (String)request.getParameter("isonecategory");
    if(isonecategory!=null){
    event.setIsOneCategoryProvider(isonecategory);
    }
	
	ObjectList list = Provider.fetch().search(con,event);
%>

<!--********************* Part3:JavaScript Code ***************-->
<!--start 客户端脚本区域-->
<script language=javascript>

var list_code = "listProvider";

function doSearch()
{
	SetValue("s_Code",GetValue("i_Code")); //编码

	SetValue("s_Name",GetValue("i_Name")); //名称
	
	SetValue("s_IsAudit",GetValue("i_IsAudit")); //是否审核类

	SetValue("s_IsOneCategoryProvider",'<%=event.getIsOneCategoryProvider()==null?"":event.getIsOneCategoryProvider()%>'); //
	
	SetValue("s_Status","1"); 

	SetValue("s_OrderField",GetValue("i_OrderField")); //排序
	SetValue("s_OrderDesc",getCheckBoxValues("i_OrderDesc")); //升降序
	doCommonSearch();
}

function bizViewProvider(id)
{
	viewWin("<%=Config.getSrv()%>?action_code=viewProvider&Id="+id);
}

function doDelete()
{
	if(!hasChooseRadio("ids"))
	{
		bizMessage("删除","供应商");
		return false;
	}
	if(!bizConfirm("删除","供应商")) return false;
	SetAction("deleteProvider");
	frm.submit();
}

function doToAdd()
{
	SetAction("toAddProvider");
	frm.submit();
}

function doToUpdate()
{
	if(!checkOne("ids")) 
	{
		bizMessage("修改","供应商");
		return false;
	}
	SetValue("Id",getCheckBoxValue("ids"));
	SetAction("toUpdateProvider");
	frm.submit();
}
function doToCopy()
{
	if(!checkOne("ids")) 
	{
		bizMessage("复制","供应商");
		return false;
	}
	SetValue("Id",getCheckBoxValue("ids"));
	SetAction("toCopyProvider");
	frm.submit();
}

key_InitDefault();
key_RegSubmitHandler(doSearch);
</script>


<%=uiBody%>>

<%@ include file="/framework/menu.jsp"%>

<!--********************* Part4:Form  ***************-->
<form id=frm action="<%=Config.getSrv()%>" method="post">
<input type=hidden name="action_code" value="">
<input type=hidden name="Id" value="">
<input type=hidden name=sortOrder value="1">
<!--查询条件保留区域-->

<input type=hidden name="s_Code" value="<%=event.getCode()%>"> <!--编码-->

<input type=hidden name="s_Name" value="<%=event.getName()%>"> <!--名称-->

<input type=hidden name="s_IsOneCategoryProvider" value="<%=event.getIsOneCategoryProvider()==null?"":event.getIsOneCategoryProvider()%>"> <!--是否一类产品供应商-->

<input type="hidden" name="s_IsAudit" value="<%= event.getIsAudit() %>">

<!-- <input type=hidden name="s_IsTradeflatProvider" value="<%=event.getIsTradeflatProvider()%>"> --> <!--是否交易平台的供应商-->

<input type=hidden name="s_Status" value="1"> <!--是否有效-->

<%@ include file="/framework/list_head.jsp"%>

<br>
<!--********************* Part5:Search Area ***************-->
<%=uiSearchStart%>>
<%
	int key_tab = 1 ;
%>

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			供应商编码：
			<input type="text" class="texts" name="i_Code" size="20" value="<%=event.viewCode()%>" key_tab="<%=key_tab++%>">
			供应商名称：
			<input type="text" class="texts" name="i_Name" size="20" value="<%=event.viewName()%>" key_tab="<%=key_tab++%>"> <input type=hidden name="i_Status" value="1"> 
			是否审核类：
			<%= SelectManager.viewYesOrNoSelect("i_IsAudit", event.getIsAudit(), true, "", "--全部--", "", "") %>
		</td>		
	</tr>
	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
            
              按&nbsp;&nbsp;排&nbsp;&nbsp;序：
			
			<select name="i_OrderField">
                <option value="" <%=(event.getOrderField().equals("1"))?"selected":""%>>设置排序字段</option>
				
				<option value="CODE" <%=(event.getOrderField().equals("CODE"))?"selected":""%>>供应商编码</option>
				
				<option value="NAME" <%=(event.getOrderField().equals("NAME"))?"selected":""%>>供应商名称</option>
				
				<!-- 
                <option value="MANAGE_PERSON" <%=(event.getOrderField().equals("MANAGE_PERSON"))?"selected":""%>>负责人</option>
				
				<option value="MANAGER_TEL" <%=(event.getOrderField().equals("MANAGER_TEL"))?"selected":""%>>负责人电话</option>
                 
				
				<option value="IS_TRADEFLAT_PROVIDER" <%=(event.getOrderField().equals("IS_TRADEFLAT_PROVIDER"))?"selected":""%>>数据类型</option>
				
				<option value="STATUS" <%=(event.getOrderField().equals("STATUS"))?"selected":""%>>有效性</option>-->
				
			</select>
			&nbsp;&nbsp;
			<input type="radio" name="i_OrderDesc" value="false" <%=(event.isOrderDesc()==false)?"checked":""%> >升序
			<input type="radio" name="i_OrderDesc" value="true"  <%=(event.isOrderDesc()==true)?"checked":""%>  >降序
			<input type="button" value="查询" class="buttons" onclick="doSearch();return false;">&nbsp;<input type="button" value="清空" class="buttons" onclick="doClearEvent();return false;">
		</td>
	</tr>

<%=uiSearchEnd%>

<!--列表标题-->
<%=UIManager.addListHeadTitle("供应商列表")%>

<!--********************* Part6:List Area ***************-->

<%=uiListStart%>>

<%@ include file="/framework/list_foot.jsp"%>

<%
	int index = 1 ;
%>	
	<%=uiListHeadTR%>>
		<%=UIManager.addListHeadCheckBox() %>

		<%=UIManager.addListHead("供应商编码",index++)%>

		<%=UIManager.addListHead("供应商名称",index++)%>

		<%=UIManager.addListHead("负责人",index++)%>

		<%=UIManager.addListHead("负责人电话",index++)%>
		
		<%=UIManager.addListHead("联系人",index++)%>

		<%=UIManager.addListHead("联系人电话",index++)%>
     
		<%=UIManager.addListHead("操作",-1)%>  
	<%=uiListHeadTREnd%>>
	
	<!--data-->
<%
	for(int i=0;i<list.size();i++)
	{
		Provider obj = (Provider)list.get(i);
%>
	<%=uiListDataTR[i%2]%> align=center>
    	<%=uiListDataTD%>>
    		<input type="checkbox" name="ids" value="<%=obj.getId()%>">
    	</td>
    	
    	<%=uiListDataTD%>><%=obj.viewCode(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewName(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewManagePerson(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewManagerTel(con)%></td>
    	
    	<%=uiListDataTD%>><%=obj.viewLinkPerson(con)%></td>
    		
    	<%=uiListDataTD%>><%=obj.viewLinkTel(con)%></td>
    
    	<%=uiListDataTD%>>
    		<a href="" onclick="bizViewProvider('<%=obj.getId()%>');return false;">浏览</a>
    	</td>
  	</tr>
<%	
	}
%>  

<%@ include file="/framework/list_foot2.jsp"%>

<%=uiListEnd%>


<!--********************* Part7:Action Area ***************-->
<%=uiCommandStart%>>
	<%=uiCommandTR%>>
		<%=uiCommandTD%>>
        <!--
		<input type=button value="    添加   " class="buttons" onclick="doToAdd();return false;">
		
		<input type=button value="    复制   " class="buttons" onclick="doToCopy();return false;">
		
		<input type=button value="    修改   " class="buttons" onclick="doToUpdate();return false;">
		<input type=button value="    删除   " class="buttons" onclick="doDelete();return false;">
		-->
        </td>
	</tr>	
<%=uiCommandEnd%>
</form>


<%@ include file="/framework/foot.jsp"%>

<!--
	Author    :Wing
	FileName  :/system/base/ProviderList.jsp
-->
